
import count from '@dfeidao/atom-nodejs/db/count';
// tslint:disable-next-line:ordered-imports
import query from '@dfeidao/atom-nodejs/db/query';
import { IncomingHttpHeaders } from 'http';
// tslint:disable-next-line: ordered-imports
import { productid,systemid } from '../../atom/config';

interface Message {

	// tslint:disable-next-line: semicolon
	pn: number
}

// 1. 查<试题库> question_bank 表取字段：

// "试题编号/question_no"、==对应"试题编号"、

// "题目/topic"、==对应"题目名称"、

// "题目类型/topic_type"、==对应"题目类型"、

// "题库类型/question_bank_type"、==对应"题库类型"、

export default async function atom(message: Message, action_id: string, session_id: string, headers: IncomingHttpHeaders) {
const pre = query(action_id, session_id, systemid);
pre.prepare('question_bank',['question_no','topic', 'topic_type','question_bank_type'],
{productid},20,message.pn,[],[]);
const c = count(action_id, session_id,systemid);
c.prepare('question_bank', { productid });
const [dt1] = await c.exec();
const [dt]= await pre.exec();
return {dt,dt1};
}

